package com.gr.springboot_shiro.dao;

import com.gr.springboot_shiro.entity.Perms;
import com.gr.springboot_shiro.entity.User;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author Katakuri
 */
@Repository
public interface UserDao{
    //@Insert("insert into tb_user values (#{id},#{username},#{password},#{salt})")
    void registerUser(User user);

    //@Select("select id,username,password,salt from tb_user where username = #{username}")
    User findByUserName(String username);

    User findRolesByUserName(String username);

    List<Perms> findPermsByRoleId(int id);
}
